home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / EditImages.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  20.6 KB  |  488 lines  |  [TEXT/KAHL]

  1. /* EditImages.c */
  2. /*****************************************************************************/
  3. /*                                                                           */
  4. /*    Out Of Phase:  Digital Music Synthesis on General Purpose Computers    */
  5. /*    Copyright (C) 1994  Thomas R. Lawrence                                 */
  6. /*                                                                           */
  7. /*    This program is free software; you can redistribute it and/or modify   */
  8. /*    it under the terms of the GNU General Public License as published by   */
  9. /*    the Free Software Foundation; either version 2 of the License, or      */
  10. /*    (at your option) any later version.                                    */
  11. /*                                                                           */
  12. /*    This program is distributed in the hope that it will be useful,        */
  13. /*    but WITHOUT ANY WARRANTY; without even the implied warranty of         */
  14. /*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          */
  15. /*    GNU General Public License for more details.                           */
  16. /*                                                                           */
  17. /*    You should have received a copy of the GNU General Public License      */
  18. /*    along with this program; if not, write to the Free Software            */
  19. /*    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.              */
  20. /*                                                                           */
  21. /*    Thomas R. Lawrence can be reached at tomlaw@world.std.com.             */
  22. /*                                                                           */
  23. /*****************************************************************************/
  24.  
  25. #include "MiscInfo.h"
  26. #include "Audit.h"
  27. #include "Debug.h"
  28. #include "Definitions.h"
  29.  
  30. #define Compiling_EditImages
  31. #include "EditImages.h"
  32. #include "Screen.h"
  33. #include "EventLoop.h"
  34.  
  35.  
  36. EXECUTE(static MyBoolean        Initialized = False;)
  37.  
  38. Bitmap*                                            Bits8Unselected;
  39. Bitmap*                                            Bits8Selected;
  40. Bitmap*                                            Bits8MouseDown;
  41. Bitmap*                                            Bits16Unselected;
  42. Bitmap*                                            Bits16Selected;
  43. Bitmap*                                            Bits16MouseDown;
  44. Bitmap*                                            MonoUnselected;
  45. Bitmap*                                            MonoSelected;
  46. Bitmap*                                            MonoMouseDown;
  47. Bitmap*                                            StereoUnselected;
  48. Bitmap*                                            StereoSelected;
  49. Bitmap*                                            StereoMouseDown;
  50. Bitmap*                                            PlayMouseUp;
  51. Bitmap*                                            PlayMouseDown;
  52. Bitmap*                                            ZoomInMouseUp;
  53. Bitmap*                                            ZoomInMouseDown;
  54. Bitmap*                                            ZoomOutMouseUp;
  55. Bitmap*                                            ZoomOutMouseDown;
  56.  
  57.  
  58. static unsigned char                oBits8Unselected[] =
  59.     {
  60.         0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0x80,0x07,0xE0,0x01,0x80,0x18,0x30,0x01,
  61.         0x80,0x30,0x18,0x01,0x80,0x30,0x18,0x01,0x80,0x30,0x18,0x01,0x80,0x38,0x30,0x01,
  62.         0x80,0x1F,0x60,0x01,0x80,0x07,0xE0,0x01,0x80,0x18,0xF8,0x01,0x80,0x30,0x3C,0x01,
  63.         0x80,0x60,0x1C,0x01,0x80,0x60,0x0C,0x01,0x80,0x60,0x0C,0x01,0x80,0x30,0x18,0x01,
  64.         0x80,0x18,0x30,0x01,0x80,0x0F,0xC0,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x40,0x01,
  65.         0x83,0xF8,0x42,0x01,0x81,0x04,0x02,0x01,0x81,0x04,0xC7,0x81,0x81,0x04,0x42,0x01,
  66.         0x81,0xF8,0x42,0x01,0x81,0x04,0x42,0x01,0x81,0x04,0x42,0x01,0x81,0x04,0x42,0x01,
  67.         0x83,0xF8,0xE3,0x81,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF
  68.     };
  69.  
  70. static unsigned char                oBits8Selected[] =
  71.     {
  72.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xE7,0xCF,0xFF,
  73.         0xFF,0xCF,0xE7,0xFF,0xFF,0xCF,0xE7,0xFF,0xFF,0xCF,0xE7,0xFF,0xFF,0xC7,0xCF,0xFF,
  74.         0xFF,0xE0,0x9F,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xE7,0x07,0xFF,0xFF,0xCF,0xC3,0xFF,
  75.         0xFF,0x9F,0xE3,0xFF,0xFF,0x9F,0xF3,0xFF,0xFF,0x9F,0xF3,0xFF,0xFF,0xCF,0xE7,0xFF,
  76.         0xFF,0xE7,0xCF,0xFF,0xFF,0xF0,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,
  77.         0xFC,0x07,0xBD,0xFF,0xFE,0xFB,0xFD,0xFF,0xFE,0xFB,0x38,0x7F,0xFE,0xFB,0xBD,0xFF,
  78.         0xFE,0x07,0xBD,0xFF,0xFE,0xFB,0xBD,0xFF,0xFE,0xFB,0xBD,0xFF,0xFE,0xFB,0xBD,0xFF,
  79.         0xFC,0x07,0x1C,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  80.     };
  81.  
  82. static unsigned char                oBits8MouseDown[] =
  83.     {
  84.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x07,0xE0,0x03,0xC0,0x18,0x30,0x03,
  85.         0xC0,0x30,0x18,0x03,0xC0,0x30,0x18,0x03,0xC0,0x30,0x18,0x03,0xC0,0x38,0x30,0x03,
  86.         0xC0,0x1F,0x60,0x03,0xC0,0x07,0xE0,0x03,0xC0,0x18,0xF8,0x03,0xC0,0x30,0x3C,0x03,
  87.         0xC0,0x60,0x1C,0x03,0xC0,0x60,0x0C,0x03,0xC0,0x60,0x0C,0x03,0xC0,0x30,0x18,0x03,
  88.         0xC0,0x18,0x30,0x03,0xC0,0x0F,0xC0,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x40,0x03,
  89.         0xC3,0xF8,0x42,0x03,0xC1,0x04,0x02,0x03,0xC1,0x04,0xC7,0x83,0xC1,0x04,0x42,0x03,
  90.         0xC1,0xF8,0x42,0x03,0xC1,0x04,0x42,0x03,0xC1,0x04,0x42,0x03,0xC1,0x04,0x42,0x03,
  91.         0xC3,0xF8,0xE3,0x83,0xC0,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  92.     };
  93.  
  94. static unsigned char                oBits16Unselected[] =
  95.     {
  96.         0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0x81,0x80,0x0F,0x81,0x8F,0x80,0x10,0x61,
  97.         0x81,0x80,0x20,0x61,0x81,0x80,0x60,0x01,0x81,0x80,0x40,0x01,0x81,0x80,0xCF,0x81,
  98.         0x81,0x80,0xF0,0xC1,0x81,0x80,0xE0,0x61,0x81,0x80,0xC0,0x31,0x81,0x80,0xC0,0x31,
  99.         0x81,0x80,0xC0,0x31,0x81,0x80,0xC0,0x31,0x81,0x80,0x40,0x31,0x81,0x80,0x60,0x61,
  100.         0x83,0xC0,0x30,0xC1,0x8F,0xF0,0x0F,0x81,0x80,0x00,0x00,0x01,0x80,0x00,0x20,0x01,
  101.         0x81,0xFC,0x21,0x01,0x80,0x82,0x01,0x01,0x80,0x82,0x63,0xC1,0x80,0x82,0x21,0x01,
  102.         0x80,0xFC,0x21,0x01,0x80,0x82,0x21,0x01,0x80,0x82,0x21,0x01,0x80,0x82,0x21,0x01,
  103.         0x81,0xFC,0x71,0xC1,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF
  104.     };
  105.  
  106. static unsigned char                oBits16Selected[] =
  107.     {
  108.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7F,0xF0,0x7F,0xF0,0x7F,0xEF,0x9F,
  109.         0xFE,0x7F,0xDF,0x9F,0xFE,0x7F,0x9F,0xFF,0xFE,0x7F,0xBF,0xFF,0xFE,0x7F,0x30,0x7F,
  110.         0xFE,0x7F,0x0F,0x3F,0xFE,0x7F,0x1F,0x9F,0xFE,0x7F,0x3F,0xCF,0xFE,0x7F,0x3F,0xCF,
  111.         0xFE,0x7F,0x3F,0xCF,0xFE,0x7F,0x3F,0xCF,0xFE,0x7F,0xBF,0xCF,0xFE,0x7F,0x9F,0x9F,
  112.         0xFC,0x3F,0xCF,0x3F,0xF0,0x0F,0xF0,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xDF,0xFF,
  113.         0xFE,0x03,0xDE,0xFF,0xFF,0x7D,0xFE,0xFF,0xFF,0x7D,0x9C,0x3F,0xFF,0x7D,0xDE,0xFF,
  114.         0xFF,0x03,0xDE,0xFF,0xFF,0x7D,0xDE,0xFF,0xFF,0x7D,0xDE,0xFF,0xFF,0x7D,0xDE,0xFF,
  115.         0xFE,0x03,0x8E,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  116.     };
  117.  
  118. static unsigned char                oBits16MouseDown[] =
  119.     {
  120.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC1,0x80,0x0F,0x83,0xCF,0x80,0x10,0x63,
  121.         0xC1,0x80,0x20,0x63,0xC1,0x80,0x60,0x03,0xC1,0x80,0x40,0x03,0xC1,0x80,0xCF,0x83,
  122.         0xC1,0x80,0xF0,0xC3,0xC1,0x80,0xE0,0x63,0xC1,0x80,0xC0,0x33,0xC1,0x80,0xC0,0x33,
  123.         0xC1,0x80,0xC0,0x33,0xC1,0x80,0xC0,0x33,0xC1,0x80,0x40,0x33,0xC1,0x80,0x60,0x63,
  124.         0xC3,0xC0,0x30,0xC3,0xCF,0xF0,0x0F,0x83,0xC0,0x00,0x00,0x03,0xC0,0x00,0x20,0x03,
  125.         0xC1,0xFC,0x21,0x03,0xC0,0x82,0x01,0x03,0xC0,0x82,0x63,0xC3,0xC0,0x82,0x21,0x03,
  126.         0xC0,0xFC,0x21,0x03,0xC0,0x82,0x21,0x03,0xC0,0x82,0x21,0x03,0xC0,0x82,0x21,0x03,
  127.         0xC1,0xFC,0x71,0xC3,0xC0,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  128.     };
  129.  
  130. static unsigned char                oMonoUnselected[] =
  131.     {
  132.         0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  133.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  134.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x80,0x00,0x01,0x81,0x90,0x00,0x01,
  135.         0x83,0x88,0x00,0x01,0x87,0xA4,0x00,0x01,0xBF,0x94,0x00,0x01,0xBF,0x94,0x00,0x01,
  136.         0xBF,0x94,0x00,0x01,0xBF,0x94,0x00,0x01,0x87,0xA4,0x00,0x01,0x83,0x88,0x00,0x01,
  137.         0x81,0x90,0x00,0x01,0x80,0x80,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  138.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  139.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF
  140.     };
  141.  
  142. static unsigned char                oMonoSelected[] =
  143.     {
  144.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  145.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  146.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFE,0x6F,0xFF,0xFF,
  147.         0xFC,0x77,0xFF,0xFF,0xF8,0x5B,0xFF,0xFF,0xC0,0x6B,0xFF,0xFF,0xC0,0x6B,0xFF,0xFF,
  148.         0xC0,0x6B,0xFF,0xFF,0xC0,0x6B,0xFF,0xFF,0xF8,0x5B,0xFF,0xFF,0xFC,0x77,0xFF,0xFF,
  149.         0xFE,0x6F,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  150.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  151.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  152.     };
  153.  
  154. static unsigned char                oMonoMouseDown[] =
  155.     {
  156.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  157.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  158.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x80,0x00,0x03,0xC1,0x90,0x00,0x03,
  159.         0xC3,0x88,0x00,0x03,0xC7,0xA4,0x00,0x03,0xFF,0x94,0x00,0x03,0xFF,0x94,0x00,0x03,
  160.         0xFF,0x94,0x00,0x03,0xFF,0x94,0x00,0x03,0xC7,0xA4,0x00,0x03,0xC3,0x88,0x00,0x03,
  161.         0xC1,0x90,0x00,0x03,0xC0,0x80,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  162.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  163.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  164.     };
  165.  
  166. static unsigned char                oStereoUnselected[] =
  167.     {
  168.         0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  169.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  170.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x80,0x01,0x01,0x81,0x90,0x09,0x81,
  171.         0x83,0x88,0x11,0xC1,0x87,0xA4,0x25,0xE1,0xBF,0x94,0x29,0xFD,0xBF,0x94,0x29,0xFD,
  172.         0xBF,0x94,0x29,0xFD,0xBF,0x94,0x29,0xFD,0x87,0xA4,0x25,0xE1,0x83,0x88,0x11,0xC1,
  173.         0x81,0x90,0x09,0x81,0x80,0x80,0x01,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  174.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  175.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF
  176.     };
  177.  
  178. static unsigned char                oStereoSelected[] =
  179.     {
  180.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  181.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  182.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFE,0xFF,0xFE,0x6F,0xF6,0x7F,
  183.         0xFC,0x77,0xEE,0x3F,0xF8,0x5B,0xDA,0x1F,0xC0,0x6B,0xD6,0x03,0xC0,0x6B,0xD6,0x03,
  184.         0xC0,0x6B,0xD6,0x03,0xC0,0x6B,0xD6,0x03,0xF8,0x5B,0xDA,0x1F,0xFC,0x77,0xEE,0x3F,
  185.         0xFE,0x6F,0xF6,0x7F,0xFF,0x7F,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  186.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  187.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  188.     };
  189.  
  190. static unsigned char                oStereoMouseDown[] =
  191.     {
  192.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  193.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  194.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x80,0x01,0x03,0xC1,0x90,0x09,0x83,
  195.         0xC3,0x88,0x11,0xC3,0xC7,0xA4,0x25,0xE3,0xFF,0x94,0x29,0xFF,0xFF,0x94,0x29,0xFF,
  196.         0xFF,0x94,0x29,0xFF,0xFF,0x94,0x29,0xFF,0xC7,0xA4,0x25,0xE3,0xC3,0x88,0x11,0xC3,
  197.         0xC1,0x90,0x09,0x83,0xC0,0x80,0x01,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  198.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  199.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  200.     };
  201.  
  202. static unsigned char                oPlayMouseUp[] =
  203.     {
  204.         0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  205.         0x80,0x18,0x00,0x01,0x80,0x1C,0x00,0x01,0x80,0x1E,0x00,0x01,0x80,0x1F,0x00,0x01,
  206.         0x80,0x1F,0x80,0x01,0x80,0x1F,0xC0,0x01,0x80,0x1F,0xE0,0x01,0x80,0x1F,0xF0,0x01,
  207.         0x80,0x1F,0xF8,0x01,0x80,0x1F,0xFC,0x01,0x80,0x1F,0xFE,0x01,0x80,0x1F,0xFF,0x01,
  208.         0x80,0x1F,0xFE,0x01,0x80,0x1F,0xFC,0x01,0x80,0x1F,0xF8,0x01,0x80,0x1F,0xF0,0x01,
  209.         0x80,0x1F,0xE0,0x01,0x80,0x1F,0xC0,0x01,0x80,0x1F,0x80,0x01,0x80,0x1F,0x00,0x01,
  210.         0x80,0x1E,0x00,0x01,0x80,0x1C,0x00,0x01,0x80,0x18,0x00,0x01,0x80,0x00,0x00,0x01,
  211.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF
  212.     };
  213.  
  214. static unsigned char                oPlayMouseDown[] =
  215.     {
  216.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  217.         0xC0,0x18,0x00,0x03,0xC0,0x1C,0x00,0x03,0xC0,0x1E,0x00,0x03,0xC0,0x1F,0x00,0x03,
  218.         0xC0,0x1F,0x80,0x03,0xC0,0x1F,0xC0,0x03,0xC0,0x1F,0xE0,0x03,0xC0,0x1F,0xF0,0x03,
  219.         0xC0,0x1F,0xF8,0x03,0xC0,0x1F,0xFC,0x03,0xC0,0x1F,0xFE,0x03,0xC0,0x1F,0xFF,0x03,
  220.         0xC0,0x1F,0xFE,0x03,0xC0,0x1F,0xFC,0x03,0xC0,0x1F,0xF8,0x03,0xC0,0x1F,0xF0,0x03,
  221.         0xC0,0x1F,0xE0,0x03,0xC0,0x1F,0xC0,0x03,0xC0,0x1F,0x80,0x03,0xC0,0x1F,0x00,0x03,
  222.         0xC0,0x1E,0x00,0x03,0xC0,0x1C,0x00,0x03,0xC0,0x18,0x00,0x03,0xC0,0x00,0x00,0x03,
  223.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  224.     };
  225.  
  226. static unsigned char                oZoomInMouseUp[] =
  227.     {
  228.         0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  229.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x87,0x80,0x00,0x01,
  230.         0x80,0x80,0x00,0x01,0x81,0x18,0xCE,0xC1,0x82,0x25,0x29,0x21,0x84,0x25,0x29,0x21,
  231.         0x84,0x25,0x29,0x21,0x87,0x98,0xC9,0x21,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  232.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x02,0x00,0x01,0x80,0x02,0x00,0x01,
  233.         0x80,0x02,0xE0,0x01,0x80,0x02,0x90,0x01,0x80,0x02,0x90,0x01,0x80,0x02,0x90,0x01,
  234.         0x80,0x02,0x90,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  235.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF
  236.     };
  237.  
  238. static unsigned char                oZoomInMouseDown[] =
  239.     {
  240.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  241.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC7,0x80,0x00,0x03,
  242.         0xC0,0x80,0x00,0x03,0xC1,0x18,0xCE,0xC3,0xC2,0x25,0x29,0x23,0xC4,0x25,0x29,0x23,
  243.         0xC4,0x25,0x29,0x23,0xC7,0x98,0xC9,0x23,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  244.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x02,0x00,0x03,0xC0,0x02,0x00,0x03,
  245.         0xC0,0x02,0xE0,0x03,0xC0,0x02,0x90,0x03,0xC0,0x02,0x90,0x03,0xC0,0x02,0x90,0x03,
  246.         0xC0,0x02,0x90,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  247.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  248.     };
  249.  
  250. static unsigned char                oZoomOutMouseUp[] =
  251.     {
  252.         0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  253.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x87,0x80,0x00,0x01,
  254.         0x80,0x80,0x00,0x01,0x81,0x18,0xCE,0xC1,0x82,0x25,0x29,0x21,0x84,0x25,0x29,0x21,
  255.         0x84,0x25,0x29,0x21,0x87,0x98,0xC9,0x21,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  256.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x38,0x04,0x01,0x80,0x44,0x04,0x01,
  257.         0x80,0x45,0x2E,0x01,0x80,0x45,0x24,0x01,0x80,0x45,0x24,0x01,0x80,0x45,0x24,0x01,
  258.         0x80,0x38,0xE2,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,
  259.         0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF
  260.     };
  261.  
  262. static unsigned char                oZoomOutMouseDown[] =
  263.     {
  264.         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  265.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC7,0x80,0x00,0x03,
  266.         0xC0,0x80,0x00,0x03,0xC1,0x18,0xCE,0xC3,0xC2,0x25,0x29,0x23,0xC4,0x25,0x29,0x23,
  267.         0xC4,0x25,0x29,0x23,0xC7,0x98,0xC9,0x23,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  268.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x38,0x04,0x03,0xC0,0x44,0x04,0x03,
  269.         0xC0,0x45,0x2E,0x03,0xC0,0x45,0x24,0x03,0xC0,0x45,0x24,0x03,0xC0,0x45,0x24,0x03,
  270.         0xC0,0x38,0xE2,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,
  271.         0xC0,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
  272.     };
  273.  
  274.  
  275. MyBoolean                        InitializeEditImages(void)
  276.     {
  277.         ERROR(Initialized,PRERR(ForceAbort,"InitializeEditImages:  already initialized"));
  278.         EXECUTE(Initialized = True;)
  279.         /* we do not watch for out of memory conditions because this should be */
  280.         /* called early when there is plenty of memory available */
  281.         Bits8Unselected = MakeBitmap(oBits8Unselected,32,32,4);
  282.         if (Bits8Unselected == NIL)
  283.             {
  284.              FailurePoint1:
  285.                 return False;
  286.             }
  287.         Bits8Selected = MakeBitmap(oBits8Selected,32,32,4);
  288.         if (Bits8Selected == NIL)
  289.             {
  290.              FailurePoint2:
  291.                 DisposeBitmap(Bits8Unselected);
  292.                 goto FailurePoint1;
  293.             }
  294.         Bits8MouseDown = MakeBitmap(oBits8MouseDown,32,32,4);
  295.         if (Bits8MouseDown == NIL)
  296.             {
  297.              FailurePoint3:
  298.                 DisposeBitmap(Bits8Selected);
  299.                 goto FailurePoint2;
  300.             }
  301.         Bits16Unselected = MakeBitmap(oBits16Unselected,32,32,4);
  302.         if (Bits16Unselected == NIL)
  303.             {
  304.              FailurePoint4:
  305.                 DisposeBitmap(Bits8MouseDown);
  306.                 goto FailurePoint3;
  307.             }
  308.         Bits16Selected = MakeBitmap(oBits16Selected,32,32,4);
  309.         if (Bits16Selected == NIL)
  310.             {
  311.              FailurePoint5:
  312.                 DisposeBitmap(Bits16Unselected);
  313.                 goto FailurePoint4;
  314.             }
  315.         Bits16MouseDown = MakeBitmap(oBits16MouseDown,32,32,4);
  316.         if (Bits16MouseDown == NIL)
  317.             {
  318.              FailurePoint6:
  319.                 DisposeBitmap(Bits16Selected);
  320.                 goto FailurePoint5;
  321.             }
  322.         MonoUnselected = MakeBitmap(oMonoUnselected,32,32,4);
  323.         if (MonoUnselected == NIL)
  324.             {
  325.              FailurePoint7:
  326.                 DisposeBitmap(Bits16MouseDown);
  327.                 goto FailurePoint6;
  328.             }
  329.         MonoSelected = MakeBitmap(oMonoSelected,32,32,4);
  330.         if (MonoSelected == NIL)
  331.             {
  332.              FailurePoint8:
  333.                 DisposeBitmap(MonoUnselected);
  334.                 goto FailurePoint7;
  335.             }
  336.         MonoMouseDown = MakeBitmap(oMonoMouseDown,32,32,4);
  337.         if (MonoMouseDown == NIL)
  338.             {
  339.              FailurePoint9:
  340.                 DisposeBitmap(MonoSelected);
  341.                 goto FailurePoint8;
  342.             }
  343.         StereoUnselected = MakeBitmap(oStereoUnselected,32,32,4);
  344.         if (StereoUnselected == NIL)
  345.             {
  346.              FailurePoint10:
  347.                 DisposeBitmap(MonoMouseDown);
  348.                 goto FailurePoint9;
  349.             }
  350.         StereoSelected = MakeBitmap(oStereoSelected,32,32,4);
  351.         if (StereoSelected == NIL)
  352.             {
  353.              FailurePoint11:
  354.                 DisposeBitmap(StereoUnselected);
  355.                 goto FailurePoint10;
  356.             }
  357.         StereoMouseDown = MakeBitmap(oStereoMouseDown,32,32,4);
  358.         if (StereoMouseDown == NIL)
  359.             {
  360.              FailurePoint12:
  361.                 DisposeBitmap(StereoSelected);
  362.                 goto FailurePoint11;
  363.             }
  364.         PlayMouseUp = MakeBitmap(oPlayMouseUp,32,32,4);
  365.         if (PlayMouseUp == NIL)
  366.             {
  367.              FailurePoint13:
  368.                 DisposeBitmap(StereoMouseDown);
  369.                 goto FailurePoint12;
  370.             }
  371.         PlayMouseDown = MakeBitmap(oPlayMouseDown,32,32,4);
  372.         if (PlayMouseDown == NIL)
  373.             {
  374.              FailurePoint14:
  375.                 DisposeBitmap(PlayMouseUp);
  376.                 goto FailurePoint13;
  377.             }
  378.         ZoomInMouseUp = MakeBitmap(oZoomInMouseUp,32,32,4);
  379.         if (ZoomInMouseUp == NIL)
  380.             {
  381.              FailurePoint15:
  382.                 DisposeBitmap(PlayMouseDown);
  383.                 goto FailurePoint14;
  384.             }
  385.         ZoomInMouseDown = MakeBitmap(oZoomInMouseDown,32,32,4);
  386.         if (ZoomInMouseDown == NIL)
  387.             {
  388.              FailurePoint16:
  389.                 DisposeBitmap(ZoomInMouseUp);
  390.                 goto FailurePoint15;
  391.             }
  392.         ZoomOutMouseUp = MakeBitmap(oZoomOutMouseUp,32,32,4);
  393.         if (ZoomOutMouseUp == NIL)
  394.             {
  395.              FailurePoint17:
  396.                 DisposeBitmap(ZoomInMouseDown);
  397.                 goto FailurePoint16;
  398.             }
  399.         ZoomOutMouseDown = MakeBitmap(oZoomOutMouseDown,32,32,4);
  400.         if (ZoomOutMouseDown == NIL)
  401.             {
  402.              FailurePoint18:
  403.                 DisposeBitmap(ZoomOutMouseUp);
  404.                 goto FailurePoint17;
  405.             }
  406.         return True;
  407.     }
  408.  
  409.  
  410. void                                CleanupEditImages(void)
  411.     {
  412.         ERROR(!Initialized,PRERR(ForceAbort,"CleanupEditImages:  not initialized"));
  413.         EXECUTE(Initialized = False;)
  414.         /* nobody wants the bitmaps anymore... <sniff> */
  415.         DisposeBitmap(Bits8Unselected);
  416.         DisposeBitmap(Bits8Selected);
  417.         DisposeBitmap(Bits8MouseDown);
  418.         DisposeBitmap(Bits16Unselected);
  419.         DisposeBitmap(Bits16Selected);
  420.         DisposeBitmap(Bits16MouseDown);
  421.         DisposeBitmap(MonoUnselected);
  422.         DisposeBitmap(MonoSelected);
  423.         DisposeBitmap(MonoMouseDown);
  424.         DisposeBitmap(StereoUnselected);
  425.         DisposeBitmap(StereoSelected);
  426.         DisposeBitmap(StereoMouseDown);
  427.         DisposeBitmap(PlayMouseUp);
  428.         DisposeBitmap(PlayMouseDown);
  429.         DisposeBitmap(ZoomInMouseUp);
  430.         DisposeBitmap(ZoomInMouseDown);
  431.         DisposeBitmap(ZoomOutMouseUp);
  432.         DisposeBitmap(ZoomOutMouseDown);
  433.     }
  434.  
  435.  
  436. static unsigned short                BarCursorImage[] =
  437.     {
  438.         0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0xF800,
  439.         0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0x0000
  440.     };
  441.  
  442. static unsigned short                BarCursorMask[] =
  443.     {
  444.         0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  445.         0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
  446.     };
  447.  
  448. void                                SetSampleInsertionCursor(void)
  449.     {
  450.         SetTheCursor(2,7,BarCursorImage,BarCursorMask);
  451.     }
  452.  
  453.  
  454. static unsigned short                ScoreIntersticeCursorImage[] =
  455.     {
  456.         0x0000,0x0100,0x0100,0x0100,0x0100,0x1110,0x3118,0x7FFC,
  457.         0x3118,0x1110,0x0100,0x0100,0x0100,0x0100,0x0000,0x0000
  458.     };
  459.  
  460. static unsigned short                ScoreIntersticeCursorMask[] =
  461.     {
  462.         0x0380,0x0380,0x0380,0x0380,0x1BB0,0x3BB8,0x7FFC,0xFFFE,
  463.         0x7FFC,0x3BB8,0x1BB0,0x0380,0x0380,0x0380,0x0380,0x0000
  464.     };
  465.  
  466. void                                SetScoreIntersticeCursor(void)
  467.     {
  468.         SetTheCursor(7,7,ScoreIntersticeCursorImage,ScoreIntersticeCursorMask);
  469.     }
  470.  
  471.  
  472. static unsigned short                ScoreOverlayCursorImage[] =
  473.     {
  474.         0x0000,0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x7FFC,
  475.         0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0000,0x0000
  476.     };
  477.  
  478. static unsigned short                ScoreOverlayCursorMask[] =
  479.     {
  480.         0x0000,0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x7FFC,
  481.         0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0000,0x0000
  482.     };
  483.  
  484. void                                SetScoreOverlayCursor(void)
  485.     {
  486.         SetTheCursor(7,7,ScoreOverlayCursorImage,ScoreOverlayCursorMask);
  487.     }
  488.